<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>19_鼠标事件-鼠标左键-单击</title>
    </head>
    <body>
        <button>按钮</button>

        <script>
            var btn = document.querySelector('button');

            btn.onclick = function(){
                console.log(1111);
            }
        </script>
    </body>
</html>